from celery_test.celery1 import add
import time

# 添加任务
# 调用celery1.py中的add函数，通过delay()或apply_async()函数，将任务发布到broker。

result = add.delay(4,4)
print(result.id)


while not result.ready():
    time.sleep(1)
print("task done:{0}".format(result.get()))